<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>修改银行信息</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="${ctx}/css/ui.datepicker.css" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
	<script src="${ctx}/js/table.js" type="text/javascript" language="javascript"></script>
	<script src="${ctx}/js/jquery-1.5.2.js" type="text/javascript" charset="utf-8"></script>
	<script src="${ctx}/js/ui.datepicker.js" type="text/javascript" charset="utf-8"></script>	
	<script src="${ctx}/js/ui.datepicker-zh-CN.js" type="text/javascript" charset="utf-8"></script>	
	<script src="${ctx}/js/help.js" type="text/javascript" ></script>
	<script type="text/javascript" charset="utf-8">
	jQuery(function($){
		$('#b_openTime').datepicker({
				yearRange: '1900:2099', //取值范围.
				showOn: 'both', //输入框和图片按钮都可以使用日历控件。
				buttonImage: '${pageContext.request.contextPath}/images/calendar.gif', //日历控件的按钮
				buttonImageOnly: true,
				showButtonPanel: true
			});		
		});
	</script>	
<style type="text/css">
body{
	background-color:#F2FDDB;
}
#button {
	position:absolute;
	width:1100px;
	height:21px;
	z-index:1;
	left: 0px;
	top: 0px;
	background-color: #333333;
}
a{
text-decoration:none;
}
a:link,a:visited,a:hover{
text-decoration:none;
color:#333333;
}
#Layer1 {
	position:absolute;
	width:1070px;
	height:116px;
	z-index:2;
	left: 0px;
	top: 176px;
}
#content {	position:absolute;
	width:1070px;
	height:172px;
	z-index:2;
	left: 0px;
	top: 0px;
}
.style{
background-color:#CCCCFF;
border:1px solid #BFD1EB;
}
.STYLE1 {color: #FF0000}
#tishi {
	position:absolute;
	width:185px;
	height:40px;
	z-index:3;
	left: 9px;
	top: 36px;
}
#div1{
position:absolute;
background:#FFFFCC;
left:880px;
top:55px;
overflow:hidden;
width:180px;
display:none;
z-index:5;
}
.c {width:20px;height:20px;}
.c ul {margin:0px;padding:0px;}
.c ul li{width:16px;height:17px;float:left; 
background-image:url('${ctx}/images/help.jpg');
list-style-type:none}
</style>
<script type="text/javascript" charset="utf-8">
function validate(){
	if(document.getElementById("b_id").value==""){
		alert("纳税人识别码不能为空");
		return false;
	}
	if(document.getElementById("b_username").value==""){
		alert("纳税人姓名不能为空");
		return false;
	}
	if(document.getElementById("b_bankname").value==""){
		alert("开户银行还没选择");
		return false;
	}
	if(document.getElementById("b_banknumber").value==""){
		alert("银行帐号还没输入");
		return false;
	}
	if(document.getElementById("b_banknumber").value.length!=19){
	    alert("银行帐号为19位数字");
	    return false;
	}
	if(document.getElementById("b_openTime").value==""){
		alert("开户时间还没输入");
		return false;
	}
	if(document.getElementById("b_banlipeople").value==""){
		alert("办理开户人员的姓名还没输入");
		return false;
	}
	if(document.getElementById("b_callnumber").value==""){
		alert("请输入有效联系方式");
		return false;
	}
	if(document.getElementById("b_bankadd").value==""){
		alert("银行地址为空，请输入");
		return false;
	}
	return true;
}
function checkByNumber(){
	if(document.getElementById("b_id").value==""){
		alert("纳税人识别码不能为空");
		return false;
	}
	if(document.getElementById("b_id").value.length!=18){
	    alert("纳税人识别码为18位数字");
	    return false;
	}
    $.ajax({   
        url:"${ctx}/taxmanage/tmBankInfo_check.action",   
        type:"post",   
        data:{"pcode":$("#b_id").val()},   
        dataType:"json",   
        success:function(data){
           var k=typeof(data);
		   if(k=="object"){
			   if(data.tmPersonInfo.taxplayer != null){
			   		$('#b_username').val(data.tmPersonInfo.taxplayer);
			   }
            }
		   if(k=="string"){
				alert(data);
			}
        }
        	
     });   
   return false;
}
</script>
</head>
  
  <body>
  <div id="content">
  <table width="1070" border="0" cellspacing="0">
  <tr>
    <td>
	<form id="form1" name="form1" action="${ctx}/manage/mbank_update.action?entity.id=${entity.id}" method="post" onSubmit="return validate();">
	<fieldset>
	<legend></legend>
	<legend></legend>
	<legend></legend>
	<div align="center">
	  <legend>修改纳税人(企业或个人)银行资料信息</legend>
	  </div>
	<p>&nbsp;</p>
	<table width="800" height="146" border="0" align="center" cellspacing="0" style="font-size:13px;">
        <tr>
          <td width="162" height="28" align="right">纳税人识别码：</td>
          <td width="191"><input  style="width:140px"type="text" name="entity.pcode" id="b_id" readonly value="${entity.pcode}"></td>
          <td width="180" align="right">纳税人(名称)姓名：</td>
          <td><input name="entity.taxplayer"type="text" id="b_username"  style="width:180px; color:#999999" value="${entity.taxplayer}" readonly></td>
          </tr>
        <tr>
          <td height="26" align="right">开户行：</td>
          <td>
         	<s:select list="{'中国人民银行','中国农业银行','中国建设银行','中国工商银行'}"  name="entity.bank" id="bank" theme="simple" value="entity.bank"></s:select>
         </td>
          <td align="right">银行帐户帐号：</td>
          <td><input name="entity.account"type="text" id="b_banknumber"  style="width:130px;" value="${entity.account}"></td>
          </tr>
        <tr>
          <td height="24" align="right">开户时间：</td>
          <td><input name="entity.startdate" type="text" class="datepicker" id="b_openTime" style="width:80px;" value="${entity.startdate}" readonly></td>
          <td align="right">办理人员：</td>
          <td><input name="entity.manager"type="text" id="b_banlipeople"  style=" width:80px;" value="${entity.manager}"></td>
          </tr>
        <tr>
          <td height="28" align="right">银行联系方式(固定)：</td>
          <td><input name="entity.phone" type="text" id="b_callnumber" style=" width:100px;" onChange="isTel(b_callnumber)" value="${entity.phone}"></td>
          <td align="right">银行地址：</td>
          <td><input name="entity.bankaddress"type="text" id="b_bankadd"  style="width:190px;" value="${entity.bankaddress}"></td>
          </tr>
        <tr>
          <td height="28" align="right">&nbsp;</td>
          <td align="right"><input style="width:70px; height:25px;"type="submit" name="Submit22" value="提 交"></td>
          <td><input  style="width:70px; height:25px;"type="reset" name="Submit2" value="重 置"></td>
          <td>&nbsp;</td>
          </tr>
    </table>
	  </fieldset>
    </form>
	</td>
  </tr>
</table>
  </div>
  <div id="div1" onMouseOver="showDiv()" onMouseOut="closeW('div1')">
<fieldset>
<fieldset>

</fieldset>
</fieldset>
</div>
  </body>
</html>
